<%-- 
    Document   : index
    Created on : Jul 9, 2011, 10:23:26 AM
    Author     : kmq
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="ProjectMgtSystem.Entities.Task" %>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="Content-Style-Type" content="text/css" />
        <link href="css/style1.css" rel="stylesheet" type="text/css" />
        <link href="css/layout.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
        <!--[if lt IE 7]>
	<link href="ie_style.css" rel="stylesheet" type="text/css" />
           <script type="text/javascript" src="js/ie_png.js"></script>
           <script type="text/javascript">
               ie_png.fix('.png');
           </script>
        <![endif]-->
    </head>
    <script type="text/javascript">
        function validateForm()
        {            
            var z= $("#Name").val();
            var msgErr ="";           
            if (z==null || z=="")
            {
                msgErr = msgErr + "\nTask Name must be filled out.";                
            }   
            if(msgErr != ""){
                alert(msgErr);
                return false;
            }       
            else{
                return true;
            }
        }   
        function show_confirm()
        {
            if(validateForm()==true)
            {
                var x= $("#ID").val();
                if(confirm("Do your want to update "+x+"?")){
                    window.location("TaskAction.do?method=Delete");
                }
                else
                    return false;
            }else{
                return false;
            }            
        }   
    </script>
    <body id="page1">
        <!-- header -->
        <div class="inner_copy"><a href="http://www.site2you.com/">Website Builder</a> <a href="http://www.freetemplatesonline.com/">fto</a> <a href="http://www.websitetemplates.org/">websitetemplates.org</a> <a href="http://www.webdesign.org/website-design">Website Design</a></div> 
        <div id="header">
            <div class="container">
                <!-- .logo -->
                <div class="logo">
                    <a href="index.html"><img src="images/logo1.jpg" alt="" /></a>
                </div>
                <!-- /.logo -->
                <!-- .nav -->
                <ul class="nav">
                    <li><a href="AdminHomepage.jsp">HOME</a></li>
                    <li><html:link href="engineer.do?method=View">ENGINEER</html:link></li>
                    <li><html:link href="ProjectAction.do?method=View">PROJECT</html:link></li>
                        <li><a href="TaskAction.do?method=View" class="current">TASK</a></li> 
                    </ul>
                    <!-- /.nav -->
                    <form action="" id="search-form">
                       <fieldset>
                        <p>Back to <a href="login.jsp">log in</a> page.</p>
                    </fieldset>
                    </form>

                </div>
            </div>
            <!-- content -->
            <div id="content">
                <div class="container">
                    <div class="inside">
                        <div class="wrapper">
                            <!--left category-->

                            <!--end left category -->
                            <div class="mainContent">

                                <!-- Our main content begins here -->

                            <%
                                java.util.ArrayList<Task> taskList = (java.util.ArrayList<Task>) request.getAttribute("taskListUpdate");
                                for (Task task : taskList) {%>

                            <table>
                                <html:form action="/TaskAction">

                                    <tr>
                                        <th scope="col">Task ID</th>
                                        <td><html:text property="taskID" styleId="ID" value="<%=task.getTaskID()%>" disabled="true"/></td>
                                    </tr> 
                                    <tr>
                                        <th scope="col">Task Name</th>
                                        <td><html:text property="taskName" styleId="Name" value="<%=task.getTaskName()%>"/></td>
                                    </tr>    
                                    <tr>
                                        <th scope="col">Description</th>
                                        <td><html:text property="description" value="<%=task.getDescription()%>"/></td>
                                    </tr> 
                                    <tr>
                                        <td><html:submit property="method" onclick="return show_confirm()"><bean:message key="TaskAction.update"/></html:submit></td>
                                        </tr>
                                </html:form>


                            </table>         
                            <% }%>
                            <!--End of main content-->




                        </div>
                    </div>
                            <div style="text-align: right"><html:link href="TaskAction.do?method=View">Back to Task Page</html:link></div>
                </div>
            </div>
        </div>
        <!-- footer -->
        <jsp:include page="../../template/footer.jsp"/>
        <!--end footer-->
    </body>
</html>
